import 'package:safetymonitor/app/components/custom_app_bar.dart';
import 'package:safetymonitor/app/core/core.dart';
import 'package:safetymonitor/router/app_pages.dart';

/// app系统设置列表
class SettingListPage extends StatelessWidget {
  const SettingListPage({super.key});

  // 列表页面
  Widget _listView(String title, Function() onTap) {
    return Container(
      color: Colors.white,
      child: ListTile(
        title: Text(title),
        onTap: onTap,
        trailing: Icon(Icons.arrow_forward_ios, size: 16,color: Colors.grey[500],),
      ),
    );
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.grey[100],
      appBar: CustomAppBar(
        titleText: '设置',
      ),
      body: ListView(
        children: [
          AppGaps.vGap10,
          _listView('系统权限', () {
            // 跳转到版本更新提示弹框
            Get.toNamed(Routes.personalPermission);
          }),
          // Divider(height: 1,color: Colors.grey[300],),
          // _listView('设置密码', () {
          //   // 跳转到设置密码
          //   Get.toNamed(Routes.settingPassword);
          // }),
        ],
      ),
    );
  }
}
